package threads;

public class StudentThread implements Runnable{
    String name;
    String id;

    public StudentThread(String name,String id){
        this.name=name;
        this.id=id;
    }

    public String toStirng(){
        return "名字："+name+"学号："+id;
    }


   StudentThread[] students;
   public StudentThread(StudentThread[] students){
       this.students=students;
   }

    @Override
    public void run() {
        for (StudentThread student:students){
            System.out.println(student.toStirng());
        }
    }
}
